<style>
    #SM-upload img {
        width: 92px;
        height: 92px;
        margin: 0 10px 10px 0;
        border-radius: 99px;
    }
</style>
<div class="sm-pop">
    <div id="dialog_form" class="layui-form" style="padding-top: 10px;">
        <div class="layui-upload-drag" id="SM-upload">
            <i class="layui-icon"></i>
            <p>点击上传，或将文件拖拽到此处</p>
        </div>
        <input type="hidden" name="avatar" id="SM-avatar">
    </div>
</div>
<script>
    layui.use(['upload', 'form'], function () {
        var upload = layui.upload;
        upload.render({
            elem: '#SM-upload',
            url: '/managerImg/uploadFileImg',
            done: function (res) {
                if (res.success) {
                    var temp='<img src="'+res.data+'">'
                        +'<p>点击上传，或将文件拖拽到此处</p>';
                    $("#SM-upload").html(template.render(temp,{}));
                    $("#SM-avatar").val(res.data);
                }
            },
            error: function () {
                layer.msg("上传异常");
            }
        });
    });
</script>